﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_QC_IQC_ORDER_ITEM
// * CreateDate    : 2012/4/15 0:43:32
// * Creater       : CodeSmith
// * LastChangeDate: 2012/4/15 0:43:32
// * LastChanger   : 2012/4/15 0:43:32
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class QcIqcOrderItemEntity : EntityBase
    {
        public QcIqcOrderItemTable TableSchema
        {
            get
            {
                return QcIqcOrderItemTable.Current;
            }
        }

        public QcIqcOrderItemEntity()
        {

        }

        public QcIqcOrderItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.OrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_ID"]));
            this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
            this.ArrivedItemId = Convert.ToString(CommonFunctions.ToObject(dr["ARRIVED_ITEM_ID"]));
            this.RevQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REV_QTY"]));
            this.CheckedQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CHECKED_QTY"]));
            this.NgQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["NG_QTY"]));
            this.CheckingFunction = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_FUNCTION"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public QcIqcOrderItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.OrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_ID"]));
            this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
            this.ArrivedItemId = Convert.ToString(CommonFunctions.ToObject(dr["ARRIVED_ITEM_ID"]));
            this.RevQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REV_QTY"]));
            this.CheckedQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CHECKED_QTY"]));
            this.NgQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["NG_QTY"]));
            this.CheckingFunction = Convert.ToString(CommonFunctions.ToObject(dr["CHECKING_FUNCTION"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return QcIqcOrderItemTable.Current;
            }
        }

        #region Perporty List
        public string OrderItemId
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemTable.C_ORDER_ITEM_ID)); }
            set { SetData(QcIqcOrderItemTable.C_ORDER_ITEM_ID, value); }
        }

        public string OrderId
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemTable.C_ORDER_ID)); }
            set { SetData(QcIqcOrderItemTable.C_ORDER_ID, value); }
        }

        public string ArrivedItemId
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemTable.C_ARRIVED_ITEM_ID)); }
            set { SetData(QcIqcOrderItemTable.C_ARRIVED_ITEM_ID, value); }
        }

        public decimal RevQty
        {
            get { return Convert.ToDecimal(GetData(QcIqcOrderItemTable.C_REV_QTY)); }
            set { SetData(QcIqcOrderItemTable.C_REV_QTY, value); }
        }

        public decimal CheckedQty
        {
            get { return Convert.ToDecimal(GetData(QcIqcOrderItemTable.C_CHECKED_QTY)); }
            set { SetData(QcIqcOrderItemTable.C_CHECKED_QTY, value); }
        }

        public decimal NgQty
        {
            get { return Convert.ToDecimal(GetData(QcIqcOrderItemTable.C_NG_QTY)); }
            set { SetData(QcIqcOrderItemTable.C_NG_QTY, value); }
        }

        public string CheckingFunction
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemTable.C_CHECKING_FUNCTION)); }
            set { SetData(QcIqcOrderItemTable.C_CHECKING_FUNCTION, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(QcIqcOrderItemTable.C_REMARK)); }
            set { SetData(QcIqcOrderItemTable.C_REMARK, value); }
        }

        #endregion
    }


}

